﻿<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Easy Responsive Tabs to Accordion</title>
    <link type="text/css" rel="stylesheet" href="css/easy-responsive-tabs.css" />
    <script src="js/jquery-1.6.3.min.js"></script>
    <script src="js/easyResponsiveTabs.js" type="text/javascript"></script>
    <style type="text/css">
        .demo {
            width: 980px;
            margin: 0px auto;
        }
        .demo h1 {
                margin:33px 0 25px;
            }
        .demo h3 {
                margin: 10px 0;
            }
        pre {
            background: #fff;
        }
        @media only screen and (max-width: 780px) {
        .demo {
                margin: 5%;
                width: 90%;
         }
        .how-use {
                float: left;
                width: 300px;
                display: none;
            }
        }
        #tabInfo {
            display: none;
        }
    </style>
</head>
<body>
    <div class="demo">
        <div>
            <h1>Easy Responsive Tabs to Accordion</h1>
            <p>Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices like: web, tablets, Mobile (IPad & IPhone). This plugin adapts the screen size and changes its action accordingly.</p>
            <h3>Features</h3>
            <ul>
                <li>Horizontal / Vertical Tabs to Accordion</li>
                <li>Tabs and accordion are created entirely with jQuery</li>
                <li>Supports multiple sets of tabs on same page</li>
                <li>Cross browser compatibility (IE7+, Chrome, Firefox, Safari and Opera)</li>
                <li>Multi device support (Web, Tablets & Mobile)</li>
            </ul>

        </div>       
        <h2 style="background: #7BC5FF; margin:30px 0 20px; padding: 1%; width: 98%;">Demo</h2>
        <span style="font-size: 16px; color:#F00; margin-left: 10px; margin-bottom:40px; display:block; font-weight: normal;"><b>Note:</b> Media query breakpoint is set <b>768px</b>. Please resize the window to see "Tabs" to "Accordion"</span>
        
        <!--Horizontal Tab-->
        <div id="horizontalTab">
            <ul class="resp-tabs-list">
                <li>Responsive Tab-1</li>
                <li>Responsive Tab-2</li>
                <li>Responsive Tab-3</li>
            </ul>
            <div class="resp-tabs-container">
                <div>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh urna, euismod ut ornare non, volutpat vel tortor. Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravida mollis.</p>
                </div>
                <div>
                    <p>This tab has icon in consectetur adipiscing eliconse consectetur adipiscing elit. Vestibulum nibh urna, ctetur adipiscing elit. Vestibulum nibh urna, t.consectetur adipiscing elit. Vestibulum nibh urna,  Vestibulum nibh urna,it.</p>
                </div>
                <div>
                    <p>Suspendisse blandit velit Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravid urna gravid eget erat suscipit in malesuada odio venenatis.</p>
                </div>
            </div>
        </div>
        <br />

        <div id="tabInfo">
            Selected tab: <span class="tabName"></span>
        </div>

        <br />
        <br />
        <!--vertical Tabs-->
        <div id="verticalTab">
            <ul class="resp-tabs-list">
                <li>Responsive Tab 1</li>
                <li>Responsive Tab 2</li>
                <li>Responsive Tab 3</li>
                <li>Long name Responsive Tab 4</li>
            </ul>
            <div class="resp-tabs-container">
                <div>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh urna, euismod ut ornare non, volutpat vel tortor. Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravida mollis.</p>
                </div>
                <div>
                    <p>This tab has icon in it.</p>
                </div>
                <div>
                    <p>Suspendisse blandit velit Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravid urna gravid eget erat suscipit in malesuada odio venenatis.</p>
                </div>
                <div>
                    <p>d ut ornare non, volutpat vel tortor. Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravida mollis.Suspendisse blandit velit eget erat suscipit in malesuada odio venenatis.</p>
                </div>
            </div>
        </div>
        <br />
        <div style="height: 30px; clear: both"></div>
        <div class="how-use">
            <h2>How to use</h2>
            <ul>
                <li>Add jQuery file (minimum jQuery-1.5.1.min.js)</li>
                <li>Included easyResponsiveTabs.js</li>
                <li>Include the css from responsive-tabs.css</li>
            </ul>

            Here is the Markup for Tabs structure:  
        
    <pre><code>
        &lt;div id="demoTab"&gt;          
            &lt;ul class="resp-tabs-list"&gt;
                &lt;li&gt; .... &lt;/li&gt;
                &lt;li&gt; .... &lt;/li&gt;
                &lt;li&gt; .... &lt;/li&gt;
            &lt;/ul&gt; 

            &lt;div class="resp-tabs-container"&gt;                                                        
                &lt;div&gt; ....... &lt;/div&gt;
                &lt;div&gt; ....... &lt;/div&gt;
                &lt;div&gt; ....... &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;    
        </code></pre>
            Call the easyResponsiveTabs function:
        <pre><code>
        $('#demoTab').easyResponsiveTabs();
        </code></pre>

            With optional parameters:
        <pre><code>
        $("#demoTab").easyResponsiveTabs({
            type: 'default', //Types: default, vertical, accordion           
            width: 'auto', //auto or any custom width
            fit: true,   // 100% fits in a container
            activate: function() {} // Callback function, gets called if tab is switched
        });
        </code></pre>
            <br />
        </div>

    </div>
</body>
<script type="text/javascript">
    $(document).ready(function () {
        $('#horizontalTab').easyResponsiveTabs({
            type: 'default', //Types: default, vertical, accordion           
            width: 'auto', //auto or any width like 600px
            fit: true,   // 100% fit in a container
            closed: 'accordion', // Start closed if in accordion view
            activate: function(event) { // Callback function if tab is switched
                var $tab = $(this);
                var $info = $('#tabInfo');
                var $name = $('span', $info);

                $name.text($tab.text());

                $info.show();
            }
        });

        $('#verticalTab').easyResponsiveTabs({
            type: 'vertical',
            width: 'auto',
            fit: true
        });
    });
</script>
</html>
